#page-wrapper.clearfix
	h1= title
	div.message
	div#poll-submit-wrapper.wrapper-div
		h3 Which is the best Javascript Templating Engine?
		form#poll-submit-form(name='poll-submit-form', method='post', action='/poll-submit')
			ul.poll
				- each val, key in output
					li(class = 'row row-#{key}')
						input(id = '#{val.name}-option', class='poll-option')(type='radio', name='poll-option', value='#{val.name}') //form element with "-" in the name threw error
						label(for='#{val.name}-option') #{val.name}
			input(type='submit', name='submit', value='Submit', id='poll-submit-form-submit')
	div#poll-results.wrapper-div.clearfix
		h3 The results uptill now
		ul.poll
			- each val,key in output
				li(id = 'result-#{val.name}-#{key}', class='poll-#{val.pid} row row-#{key}')
					span.col.name #{val.name}
					span.col.value #{val.value}
			.reset-link(style="text-align:right;") <!-- inline CSS -->
				a(href='/reset-poll') Reset Results
